import axios from 'axios'
import {notification} from 'ant-design-vue'
function request(options) {
    return axios(options).then(res => {
        return res
    }).catch(error => {
        const {
            response: { status, statusText }// eslint-disable-line no-unused-vars
        } = error
        notification.error({
          
            message: h=>{ // eslint-disable-line no-unused-varss
                <div>
                    请求错误<span style="color:red"></span>:{options.url}
                </div>
            },
            description:
            statusText,
        });
        return Promise.reject(error);
    })
}
export default request;